/* 潮汐漂流瓶官网样式 */

:root {
  --primary-blue: #3b82f6;
  --light-blue: #dbeafe;
  --ocean-gradient: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #06b6d4 100%);
  --wave-pattern: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: #1f2937;
  overflow-x: hidden;
}

/* 视频背景 */
.video-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  overflow: hidden;
  transition: opacity 0.3s ease-out; /* 添加平滑的透明度过渡效果 */
}

.video-background video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translateX(-50%) translateY(-50%);
  object-fit: cover;
  z-index: -1;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

/* 视频加载完成后显示 */
.video-background video.loaded {
  opacity: 1;
}

/* 视频遮罩层 - 提供渐变叠加效果 */
.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg, 
    rgba(30, 64, 175, 0.4) 0%, 
    rgba(59, 130, 246, 0.3) 50%, 
    rgba(6, 182, 212, 0.4) 100%
  );
  z-index: 0;
  /* 添加平滑的背景过渡效果，让动态遮罩变化更自然 */
  transition: background 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 响应式视频优化 */
@media (max-width: 768px) {
  .video-background {
    display: none; /* 移动设备默认隐藏视频 */
  }
  
  .wave-bg {
    display: block !important; /* 移动设备显示备用背景 */
  }
}

/* 低性能设备优化 */
@media (prefers-reduced-motion: reduce) {
  .video-background video {
    animation: none;
  }
  
  .video-overlay {
    background: linear-gradient(
      135deg, 
      rgba(30, 64, 175, 0.6) 0%, 
      rgba(59, 130, 246, 0.5) 50%, 
      rgba(6, 182, 212, 0.6) 100%
    );
  }
}

/* 网络慢速连接优化 */
@media (prefers-reduced-data) {
  .video-background {
    display: none;
  }
  
  .wave-bg {
    display: block !important;
  }
}

/* 保留原有的波浪背景作为备用 - 当视频无法播放时显示 */
.wave-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--ocean-gradient);
  background-attachment: fixed;
  z-index: -3;
  display: none; /* 默认隐藏，只在视频加载失败时显示 */
}

.wave-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--wave-pattern);
  animation: wave-float 20s ease-in-out infinite;
}

@keyframes wave-float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(2deg); }
}

/* 浮动气泡效果 */
.bubble {
  position: fixed;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: bubble-float 15s infinite ease-in-out;
  z-index: -1;
}

.bubble:nth-child(3) {
  width: 60px;
  height: 60px;
  left: 10%;
  animation-delay: 0s;
}

.bubble:nth-child(4) {
  width: 80px;
  height: 80px;
  left: 70%;
  animation-delay: 5s;
}

.bubble:nth-child(5) {
  width: 40px;
  height: 40px;
  left: 40%;
  animation-delay: 10s;
}

@keyframes bubble-float {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) scale(1);
    opacity: 0;
  }
}

/* 导航栏 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 100;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* 主要内容区域 */
.main-content {
  padding-top: 80px;
}

/* 英雄区域 */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  position: relative;
  padding: 2rem;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  z-index: 10;
}

.hero h1 {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #e0f2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  animation: text-glow 3s ease-in-out infinite alternate;
}

@keyframes text-glow {
  from { text-shadow: 0 0 20px rgba(255, 255, 255, 0.5); }
  to { text-shadow: 0 0 30px rgba(255, 255, 255, 0.8); }
}

.hero .subtitle {
  font-size: 1.5rem;
  margin-bottom: 3rem;
  opacity: 0.9;
  font-weight: 300;
  letter-spacing: 0.5px;
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
  color: var(--primary-blue);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(255, 255, 255, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-3px);
}

/* 功能展示区域 */
.features {
  padding: 6rem 2rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  background: white;
  padding: 3rem 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid rgba(59, 130, 246, 0.1);
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
}

.feature-icon {
  width: 120px;
  height: 120px;
  margin: 0 auto 2rem;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--light-blue) 0%, #ffffff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.feature-icon img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.feature-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--primary-blue);
}

.feature-card p {
  color: #6b7280;
  line-height: 1.7;
}

/* 下载区域 */
.download-section {
  padding: 6rem 2rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
}

.qr-code {
  width: 200px;
  height: 200px;
  margin: 2rem auto;
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: #6b7280;
}

/* 页脚 */
.footer {
  background: rgba(17, 24, 39, 0.95);
  color: white;
  padding: 4rem 2rem 2rem;
  backdrop-filter: blur(20px);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
}

.footer-section h4 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #e5e7eb;
}

.footer-section p,
.footer-section a {
  color: #9ca3af;
  text-decoration: none;
  margin-bottom: 0.5rem;
  display: block;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #374151;
  text-align: center;
  color: #9ca3af;
  font-size: 0.9rem;
}

.footer-bottom a {
  color: #60a5fa;
  text-decoration: none;
}

.footer-bottom a:hover {
  text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero .subtitle {
    font-size: 1.2rem;
  }
  
  .features {
    padding: 4rem 1rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .feature-card {
    padding: 2rem 1.5rem;
  }
}

/* 加载动画 */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--ocean-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: opacity 0.5s ease;
}

.loading.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 微信二维码弹窗样式 */
.weixin-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  animation: modal-fade-in 0.3s ease;
}

@keyframes modal-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.weixin-modal-content {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 420px;
  width: 90%;
  max-height: 90vh;
  overflow: auto;
  position: relative;
  animation: modal-slide-in 0.3s ease;
  margin: 1rem;
}

@keyframes modal-slide-in {
  from {
    transform: scale(0.7) translateY(-50px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.weixin-modal-header {
  padding: 1.5rem 2rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.weixin-modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
}

.weixin-modal-close {
  font-size: 1.5rem;
  color: #9ca3af;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.weixin-modal-close:hover {
  background: #f3f4f6;
  color: #374151;
}

.weixin-modal-body {
  padding: 2rem;
  text-align: center;
}

.weixin-qr-image {
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 300px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
  object-fit: contain;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.weixin-modal-text {
  color: #6b7280;
  font-size: 0.9rem;
  margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .weixin-modal-content {
    width: 95%;
    margin: 0.5rem;
    max-width: 350px;
  }
  
  .weixin-modal-header,
  .weixin-modal-body {
    padding: 1.5rem;
  }
  
  .weixin-qr-image {
    max-width: 250px;
    max-height: 250px;
  }
}

@media (max-width: 480px) {
  .weixin-modal-content {
    width: 98%;
    margin: 0.25rem;
    max-width: 320px;
  }
  
  .weixin-modal-header,
  .weixin-modal-body {
    padding: 1rem;
  }
  
  .weixin-qr-image {
    max-width: 220px;
    max-height: 220px;
  }
  
  .weixin-modal-header h3 {
    font-size: 1.1rem;
  }
} 